/* $Id: ServiceDelegate.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.delegate;

import java.util.List;

import ae.pcfc.etks.online.common.vo.AdminApprovalVO;
import ae.pcfc.etks.online.common.vo.AppMetaDataDetailVO;
import ae.pcfc.etks.online.common.vo.ClientRoleVO;
import ae.pcfc.etks.online.common.vo.DepartmentVO;
import ae.pcfc.etks.online.common.vo.PagingVO;
import ae.pcfc.etks.online.common.vo.ProcessVO;
import ae.pcfc.etks.online.common.vo.ServiceRoleVO;
import ae.pcfc.etks.online.common.vo.ServiceVO;
import ae.pcfc.etks.online.common.vo.UserServiceVO;
import ae.pcfc.etks.online.common.vo.UserVO;
import ae.pcfc.etks.online.common.vo.WorkflowRequestSearchCriteriaVO;
import ae.pcfc.etks.online.common.vo.WorkflowRequestVO;


public interface ServiceDelegate extends BaseDelegate{
	
	/**
	 * serviceRegistration
	 * Method to register a service by an user
	 * @param serviceVO
	 * @return
	 * boolean
	 */
	public boolean serviceRegistration(ServiceVO serviceVO);
	
	/**
	 * serviceUpdate
	 * Method to update the service information
	 * @param serviceVO
	 * @return
	 * boolean
	 */
	public boolean serviceUpdate(ServiceVO serviceVO);
	
	/**
	 * deleteServiceById
	 * Method to delete the service by id
	 * This method only disables the service
	 * @param Id
	 * @return
	 * boolean
	 */
	public boolean deleteServiceById(Long Id);
	
	/**
	 * getServicesList
	 * Method to find the list of active services available
	 * @return
	 * List<ServiceVO>
	 */
	public List<ServiceVO> getServicesList();
	
	/**
	 * getServiceByPrimaryKey
	 * Method to find service by primary key
	 * @param Id
	 * @return
	 * ServiceVO
	 */
	public ServiceVO getServiceByPrimaryKey(Long Id);
	
	/**
	 * findServiceByUserNameAndTrakheesId
	 * Method to find the services which an user can register, this excludes the already associated services and active registered application requests 
	 * @param userName
	 * @param trakheesId
	 * @return
	 * List<ServiceVO>
	 */
	public List<ServiceVO> findServiceByUserNameAndTrakheesId(String userName, String trakheesId);
	
	/**
	 * addServiceReq
	 * Method to add service request
	 * @param userName
	 * @param serviceVOs
	 * @param appMetaDataVO
	 * @return
	 * String
	 */
	public String addServiceReq(String userName, List<ServiceVO> serviceVOs, AppMetaDataDetailVO appMetaDataVO);
	
	/**
	 * findServiceListByIds
	 * Method to find services by ids
	 * @param ids
	 * @return
	 * List<ServiceVO>
	 */
	public List<ServiceVO> findServiceListByIds(List<Long> ids);
	
	/**
	 * findServiceRequestByApplicationId
	 * Method to find service request by application id
	 * @param applicationId
	 * @return
	 * List<ServiceVO>
	 */
	public List<ServiceVO> findServiceRequestByApplicationId(String applicationId);
	
	/**
	 * reviewRegisterService
	 * Method to process the admin's approval action of the service registration 
	 * @param adminApprovalVO
	 * void
	 */
	public void reviewRegisterService(AdminApprovalVO adminApprovalVO);
	
	/**
	 * findServiceListByUserName
	 * Method to find service list associated with a user
	 * @param userName
	 * @return
	 * List<ServiceVO>
	 */
	public List<ServiceVO> findServiceListByUserName(String userName);
	
	/**
	 * getServiceListByPagingVO
	 * Method to find the service list page based on the paging information
	 * @param pagingVO
	 * @return
	 * List<ServiceVO>
	 */
	public List<ServiceVO> getServiceListByPagingVO(PagingVO pagingVO);

	/**
	 * serviceListRegistration
	 * Method to register a list of services for an employee
	 * @param userServiceVO
	 * @return
	 * boolean
	 */
	public boolean serviceListRegistration(UserServiceVO userServiceVO);

	/**
	 * registerEmployee
	 * Method to register a company employee
	 * @param userVO
	 * @param userServiceVO
	 * void
	 */
	public void registerEmployee(UserVO userVO, UserServiceVO userServiceVO);

	/**
	 * updateEmployee
	 * Method to update the company employee information
	 * @param userVO
	 * @param userServiceVO
	 * void
	 */
	public void updateEmployee(UserVO userVO, UserServiceVO userServiceVO);
	
	/**
	 * findClientRolesByRoleIds
	 * Method to find the client roles by role ids
	 * @param roleIds
	 * @return
	 * List<ClientRoleVO>
	 */
	public List<ClientRoleVO> findClientRolesByRoleIds(List<Integer> roleIds);
	
	/**
	 * findServiceRolesByServiceType
	 * Method to find service roles by service type (Internal/External)
	 * @param serviceType
	 * @return
	 * List<ServiceRoleVO>
	 */
	public List<ServiceRoleVO> findServiceRolesByServiceType(String serviceType);
	
	/**
	 * findServiceDepartmentsByDepartmentId
	 * Method to find the service departments by department codes
	 * @param departmentCodes
	 * @return
	 * List<DepartmentVO>
	 */
	public List<DepartmentVO> findServiceDepartmentsByDepartmentId(List<String> departmentCodes);

	/**
	 * registerInternalStaff
	 * Method to register internal trakhees staff
	 * @param userVO
	 * @param arrRoles
	 * void
	 */
	public void registerInternalStaff(UserVO userVO, List<Long> arrRoles);

	/**
	 * findServiceRolesByUserName
	 * Method to find the service roles an user is associated with
	 * @param strUserName
	 * @return
	 * List<ServiceRoleVO>
	 */
	public List<ServiceRoleVO> findServiceRolesByUserName(String strUserName);

	/**
	 * updateInternalStaff
	 * Method to update the information about the internal trakhees staff
	 * @param userVO
	 * @param arrRoles
	 * void
	 */
	public void updateInternalStaff(UserVO userVO, List<Long> arrRoles);

	public List<ProcessVO> getProcessList();

}
